package Com.amit.corejava;

class Address
{
	String city;
	String state;
	String country;
	
	public Address(String city, String state, String country) {
		super();
		this.city = city;
		this.state = state;
		this.country = country;
	}
	
}

public class Emp {
	
	int id;
	String name;
	Address address;
	
	public Emp(int id, String name, Address address) {
		super();
		this.id = id;
		this.name = name;
		this.address = address;
	}
	
	
	public void display()
	{
		System.out.println(id+" "+name);
		
		System.out.println(address.city+" "+address.state+" "+address.country);
	}
	
	
	
	public static void main(String[] args) {
		
		Address address1=new Address("lko", "up", "india");
		
		Address address2=new Address("lko1", "up1", "india1");
		
		
		Emp e=new Emp(12, "amit", address1);
		
		Emp e1=new Emp(13, "anil", address2);
		
		e.display();
		e1.display();
		
		
		
	}
	
	
	
	
	
	

}
